﻿using System;

namespace NarcissisticNumber
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("1000以内的水仙花数：");
            
            for (int i = 100; i < 1000; i++)
            {
                int hundreds = i / 100;       
                int tens = (i / 10) % 10;     
                int units = i % 10; 
                
                
                
                int cubeSum = hundreds * hundreds * hundreds + 
                              tens * tens * tens + 
                              units * units * units;
                if (cubeSum == i)
                {
                    Console.Write(i + " ");
                }
            }
        }
    }
}
/*using System;

namespace PrimeNumber
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine("100以内的质数：");

            for (int i = 2; i <= 100; i++)
            {
                bool isPrime = true;

                for (int j = 2; j * j <= i; j++)
                {
                    if (i % j == 0)
                    {
                        isPrime = false;
                        break;
                    }
                }


                if (isPrime)
                {
                    Console.Write(i + " ");
                }
            }
        }
    }
}*/